import { Routes, Route } from "react-router-dom";
import Login from "../../view/Login/login.tsx";
import Home from "../../view/Home/home.tsx";
import User from "../../view/Users/user/user.tsx";
import Permission from "../../view/Permission/permission.tsx";
import LayoutAside from "../../view/Layout/layout.tsx";

const Router = () => {
  return (
    <Routes>
      {/* 登录页单独处理 */}
      <Route path="/login" element={<Login />} />
      <Route path="/*" element={<LayoutAside />}>
        <Route index element={<Home />} />
        <Route path="user" element={<User />} />
        <Route path="permission" element={<Permission />} />
      </Route>
    </Routes>
  );
};

export default Router;
